package com.example.chamberlainserver.dto;

import javax.validation.constraints.*;
import java.time.LocalDateTime;

/**
 * 辅导员班级关联数据传输对象
 */
public class CounselorClassDTO {

    @NotNull(message = "辅导员ID不能为空")
    private Long counselorId;

    @NotNull(message = "班级ID不能为空")
    private Long classId;

    private LocalDateTime assignTime;

    private Boolean isPrimary; // 是否为主要负责辅导员

    // 构造函数
    public CounselorClassDTO() {}

    public CounselorClassDTO(Long counselorId, Long classId, LocalDateTime assignTime, Boolean isPrimary) {
        this.counselorId = counselorId;
        this.classId = classId;
        this.assignTime = assignTime;
        this.isPrimary = isPrimary;
    }

    // Getter 和 Setter 方法
    public Long getCounselorId() {
        return counselorId;
    }

    public void setCounselorId(Long counselorId) {
        this.counselorId = counselorId;
    }

    public Long getClassId() {
        return classId;
    }

    public void setClassId(Long classId) {
        this.classId = classId;
    }

    public LocalDateTime getAssignTime() {
        return assignTime;
    }

    public void setAssignTime(LocalDateTime assignTime) {
        this.assignTime = assignTime;
    }

    public Boolean getIsPrimary() {
        return isPrimary;
    }

    public void setIsPrimary(Boolean isPrimary) {
        this.isPrimary = isPrimary;
    }

    @Override
    public String toString() {
        return "CounselorClassDTO{" +
                "counselorId=" + counselorId +
                ", classId=" + classId +
                ", assignTime=" + assignTime +
                ", isPrimary=" + isPrimary +
                '}';
    }
}